using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential)]
public struct GridSize
{
	public int x, y;
}

[StructLayout(LayoutKind.Sequential)]
public struct Vertex3F
{
	public float x, y, z;
}

[StructLayout(LayoutKind.Sequential)]
public struct Quad3
{
	public Vertex3F bl, br, tl, tr;
}

[StructLayout(LayoutKind.Sequential)]
public struct TexParams
{
	public uint minFilter, magFilter, wrapS, wrapT;
}

[StructLayout(LayoutKind.Sequential)]
public struct Color3B
{
	public byte r, g, b;
	
	public Color3B(byte ir, byte ig, byte ib)
	{
		r = ir;
		g = ig;
		b = ib;
	}
	
	public static readonly Color3B White = new Color3B(255, 255, 255);
	public static readonly Color3B Yellow = new Color3B(255, 255, 0);
	public static readonly Color3B Blue = new Color3B(0, 0, 255);
	public static readonly Color3B Green = new Color3B(0, 255, 0);
	public static readonly Color3B Red = new Color3B(255, 0, 0);
	public static readonly Color3B Magenta = new Color3B(255, 0, 255);
	public static readonly Color3B Black = new Color3B(0, 0, 0);
	public static readonly Color3B Orange = new Color3B(255, 127, 0);
	public static readonly Color3B Gray = new Color3B(166, 166, 166);
}

[StructLayout(LayoutKind.Sequential)]
public struct BlendFunc
{
	public uint src, dst;
}

[StructLayout(LayoutKind.Sequential)]
public struct Tex2F
{
	public float u, v;
}

[StructLayout(LayoutKind.Sequential)]
public struct Color4B
{
	public byte r, g, b, a;
}

[StructLayout(LayoutKind.Sequential)]
public struct V3F_C4B_T2F
{
	public Vertex3F vertices;
	public Color4B colors;
	public Tex2F texCoords;
}

[StructLayout(LayoutKind.Sequential)]
public struct V3F_C4B_T2F_Quad
{
	public V3F_C4B_T2F tl, bl, tr, br;
}
